home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / rettig.arc / TRSOURCE.EXE / ISPRINT.ASM < prev    next >
Assembly Source File  |  1990-10-22  |  1KB  |  41 lines

  1. ;  Filename: ISPRINT.ASM
  2. ;  Program.: Clipper Extended Library
  3. ;  Authors.: Tom Rettig and Brian Russell, modified by Leonard Zerman
  4. ;  Date....: November 1, 1985
  5. ;  Notice..: Placed in the public domain by Tom Rettig Associates.
  6. ;  Notes...: Works for parallel printers only.
  7. ;
  8. ;
  9. ;      ISPRINTER() ::= True if the printer is online and ready
  10. ;
  11. ;------------------------------------------------------------------------------
  12. ;  ISPRINTER()
  13. ;  Syntax: ISPRINTER()
  14. ;  Return: Logical true if the printer is online and ready, otherwise false
  15.  
  16.          INCLUDE EXTENDA.INC
  17.  
  18.          CLpublic <ISPRINTER>
  19.  
  20.          CLfunc log ISPRINTER
  21.  
  22.          CLcode
  23.  
  24.          PUSH     AX
  25.          PUSH     DX
  26.          MOV      AH,2H          ; printer status function
  27.          MOV      DX,0H          ; which printer to check
  28.          INT      17H            ; read printer status
  29.  
  30.          XOR      BX,BX          ; false
  31.          CMP      AH,90H         ; not busy or selected (90h = 10010000)
  32.          JNE      RET_ISPRINTER  ; return false if other than above
  33.          MOV      BX,1           ; true
  34.  
  35. RET_ISPRINTER:
  36.          POP      DX
  37.          POP      AX
  38.          CLret    BX
  39. ;-----------------------------------------------------------------------------
  40.          END
  41.